import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim_items
from util import *

class LanternShield(sim_items.Armor, sim_items.LightSource):
    def __init__(self):
        bonuses = {
                'evMod': 4,
                'pvMod': 0,
        }

        sim_items.Armor.__init__(self, 
                'lantern shield',    # name
                parole.map.AsciiTile('0', colors['Silver']), # appearance
                9,          # weight (lbs)
                ['shield'],   # slot(s)
                7000,       # energy to wear
                bonuses)
        
        sim_items.LightSource.__init__(self,
                'lantern shield',     #name
                50,     # layer
                parole.map.AsciiTile('0', colors['Silver']),
                9,  # weight
                7000,   # light energy
                (255,255,255),  # light color
                1.5,    # light intensity
                60*60000,  # burn time
                dousable=False,
                handsNeeded=0, # already takes a hand to ready as shield
                unidDescription="An oil-fueled flame enclosed in glass placed "\
                    "behind a medium sized shield. Lantern shields are "\
                    "prized for providing both protection and light.")

    def listen(self, event):
        sim_items.Armor.listen(self, event)
        sim_items.LightSource.listen(self, event, superListen=False)
                
#========================================
thingClass = LanternShield
